from mycelery.main import app
import celery


class A(celery.Task):

    @app.task(name="email", bind=True, default_retry_delay=1 * 60)
    def send_email(self):
        """发送短信的任务1"""
        try:
            int('a')
        except ValueError as exc:
            self.retry(exc=exc, countdown=3)

        return 'send email task'
